package LeetCode.LeetCode2;

public class Num344 {
    public static char[] reverseString(char[] s) {
        for (int i = 0; i < s.length / 2; i++) {
            char temp = ' ';
            temp = s[i];
            s[i] = s[s.length - i - 1];
            s[s.length - i - 1] = temp;
        }
        return s;
    }

    public static void main(String[] args) {
        char[] s = {'a','b','c'};
        for (int i = 0; i < s.length / 2; i++) {
            char temp = ' ';
            temp = s[i];
            s[i] = s[s.length - i - 1];
            s[s.length - i - 1] = temp;
        }
//        reverseString(arr);
        System.out.println(s);
    }
}
